import { ActivatedRoute } from '@angular/router';
import { Component } from '@angular/core';
import { Location } from '@angular/common'

@Component({
    selector: 'estate-qqmap',
    templateUrl: './estate-qqmap.component.html',
    styleUrls: ['./estate-qqmap.component.scss']
})
export class EstateQqMapComponent {

    public mapOption = {
        type: "plus",
        latng: {
            lat: "",
            lng: ""
        },
        key:"",
        name:""
    }

    constructor(
        private routeInfo: ActivatedRoute,
        private location: Location,
    ) {

    }

    ngOnInit() {

        this.mapOption.latng.lat = this.routeInfo.snapshot.queryParams['lat']
        this.mapOption.latng.lng = this.routeInfo.snapshot.queryParams['lng']
        this.mapOption.key = this.routeInfo.snapshot.queryParams['key'];
        this.mapOption.name = this.routeInfo.snapshot.queryParams['name'];
        

    }

    onClickLeft() {
        this.location.back()
    }
}